#ifndef GUARD_Player_h
#define GUARD_Player_h

#include <vector>
#include "SDL.h"
#include "SDL_opengl.h"	// should be pure OpenGL
#include "Map.h"
#include "Collidable.h"
#include "SpriteSheet.h"

const float SPEED = 0.1f;
const float GRAVITY = 0.005f;

class Player : public Collidable
{
	private:
		float xVel;
		float yVel;
		//GLuint texture;
		GLfloat scale;
		SpriteSheet* sheet;
	
	Uint32 animationTick;
	const Uint32 frameLength;
	int frame;
	
	void animate();
		
		const Map* map;
		
	public:
		GLfloat width;
		GLfloat height;
		GLfloat posX;
		GLfloat posY;
		
		Player(const Map* map);
		
		virtual Vector2 getPosition() const;
		virtual Rect getSize() const;
		void draw();
		void update();
		void handleEvent(SDL_Event* event);
};

#endif